<style lang="scss">
.page {
  width: 100%;
  height: 100%;
}
</style>

<template>
  <div class="page-index" />
</template>

<script>
import axios from "axios"
export default {
  name: "PageIndex",
  layout: "index",
  fetch({ store }) {
    return axios.post("/api/menu").then(function(res) {
      if (res.status === 200) {
        let arr = res.data.menuList
        store.commit("changeIndexMenu", arr)
      }
    })
  },
  data() {
    return {}
  },
  head() {
    return {
      title: "首页",
      meta: [
        { charset: "utf-8" },
        { name: "viewport", content: "width=device-width;initial-scale=1" }
      ]
    }
  }
}
</script>
